def print_gomoku_board(size=15):
    """
    打印五子棋棋盘
    
    参数:
    size (int): 棋盘大小，默认为15x15
    """
    print("=" * (size * 2 + 1))
    print(f"   五子棋棋盘 ({size}x{size})")
    print("=" * (size * 2 + 1))
    
    # 打印列坐标
    print("   ", end="")
    for col in range(size):
        # 使用字母作为列坐标 (A-O)
        print(f"{chr(ord('A') + col)} ", end="")
    print()
    
    # 打印分隔线
    print("   +" + "—+" * size)
    
    # 打印棋盘主体
    for row in range(size):
        # 打印行坐标 (1-15)
        print(f"{row + 1:2d} |", end="")
        
        # 打印棋盘格子
        for col in range(size):
            # 中心天元位置
            if row == size // 2 and col == size // 2:
                print("●|", end="")
            # 星位位置 (在中国象棋中通常有4个星位)
            elif ((row == 3 or row == size - 4) and (col == 3 or col == size - 4)):
                print("○|", end="")
            else:
                print(" |", end="")
        
        print(f" {row + 1:2d}")
        print("   +" + "—+" * size)
    
    # 打印列坐标
    print("   ", end="")
    for col in range(size):
        print(f"{chr(ord('A') + col)} ", end="")
    print()
    
    print("=" * (size * 2 + 1))
    
    # 打印说明
    print("\n棋盘说明:")
    print("● - 天元位置 (中心点)")
    print("○ - 星位位置")
    print("坐标: 行(1-15) + 列(A-O)，例如: 8H 表示第8行第8列")

def print_gomoku_board_simple(size=15):
    """
    打印简化版五子棋棋盘
    
    参数:
    size (int): 棋盘大小，默认为15x15
    """
    print("简化版五子棋棋盘")
    print("-" * (size * 2 + 1))
    
    for i in range(size):
        # 打印横线
        if i == 0:
            print("  " + " ".join([chr(ord('A') + j) for j in range(size)]))
        
        # 打印竖线和交叉点
        print(f"{i+1:2d}" + "●" + "○" * (size - 1))
        print("  " + "+-" * size + "+")

def main():
    """主函数"""
    print("五子棋棋盘打印程序")
    print("=" * 30)
    
    # 打印标准15x15棋盘
    print_gomoku_board(15)
    
    # 打印简化版棋盘（可选）
    # print("\n" + "=" * 30)
    # print_gomoku_board_simple(15)

if __name__ == "__main__":
    main()
